#ifndef _MK_MESSAGE_PARSER_H
#define _MK_MESSAGE_PARSER_H
#include "message.h"
#include "xml.h"
#include <eXosip2/eXosip.h>

void event_thread(void* lParam);

void register_failure_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void register_sucess_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void call_message_parse(struct eXosip_t *context_eXosip, eXosip_event_t* je);

void notify_mediastatus_parse(struct eXosip_t *context_eXosip, eXosip_event_t* je, mk_xml *pxml);

Uint32 up_playcontrol_parse(struct eXosip_t *context_eXosip, eXosip_event_t* je);

void add_subscribe_response_xml(struct eXosip_t *context_eXosip, eXosip_event_t *je, osip_message_t *answer, Uint32 ret);

void new_msg_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void regester_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void message_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void info_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

Uint32 subscribe_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void recv_invite_200ok_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void recv_invite_error_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void xml_msg_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, char* pbuf);

Uint32 up_play_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

Uint32 up_stopplay_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void message_answered_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void subscribe_answered_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void subscribe_new_request_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void subscribe_notify_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

void notify_answered_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je);

Uint32 xml_subscribe_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, char* pxmlstr);

void response_catalog_parse(struct eXosip_t *context_eXosip, mk_xml *pxml);

void notify_keepalive_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

void notify_alarm_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

void notify_broadcast_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

void control_cmdtype_deviceconfig_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

void control_device_control_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

void control_msg_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

void requery_catalog_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

void requery_deviceinfo_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

void requery_devicestatus_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

void requery_recordinfo_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

void requery_configdownload_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

void requery_preset_parse(struct eXosip_t *context_eXosip, eXosip_event_t *je, mk_xml *pxml);

//response parser
void response_recordinfo_parse(struct eXosip_t *context_eXosip, mk_xml *pxml);

void response_broadcast_parse(struct eXosip_t *context_eXosip, mk_xml* pxml);

void response_deviceconfig_parse(struct eXosip_t *context_eXosip, mk_xml* pxml);

void response_configdownload_parse(struct eXosip_t *context_eXosip, mk_xml* pxml);

void response_devicecontrol_parse(struct eXosip_t *context_eXosip, mk_xml* pxml);

void response_devicestatus_parse(struct eXosip_t *context_eXosip, mk_xml *pxml);

void response_deviceinfo_parse(struct eXosip_t *context_eXosip, mk_xml *pxml);

void response_preset_parse(struct eXosip_t *context_eXosip, mk_xml *pxml);
#endif